package com.zhilong;

import java.util.List;
import java.util.ArrayList;

public class Question {
    private int id = 0;
	private String desc = null;
	private String category = null;
	private int point = 0;
	private List<Answer> answers = new ArrayList<Answer>();
	
	public void setId(int id)
	{
		this.id = id;
	}
	
	public int getId()
	{
		return id;
	}
	
	public void setDesc(String desc)
	{
		this.desc = desc;
	}
	
	public String getDesc()
	{
		return desc;
	}
	
	public void clearAnswers()
	{
		answers.clear();
	}
	
	public void addAnswer(int id, String desc)
	{
		answers.add(new Answer(id, desc));
	}
	
	public List<Answer> getAnswers()
	{
		return answers;
	}
	
	public void setPoint(int point)
	{
		this.point = point;
	}
	
	public int getPoint()
	{
		return point;
	}
	
	public void setCategory(String category)
	{
		this.category = category;
	}
	
	public String getCategory()
	{
		return category;
	}
	
	public String toString()
	{
		String ret = "id = " + id + ", desc = " + desc;
		
		ret += "\ncategory = " + category + ", point = " + point;
		
		return ret;
	}
}
